package com.solo.system.service.impl;

import com.solo.common.core.base.service.impl.BasicServiceImpl;
import com.solo.common.core.utils.ServletUtils;
import com.solo.system.api.entity.SysI18nTypeData;
import com.solo.system.mapper.SysI18nTypeDataMapper;
import com.solo.system.model.i18n.type.resp.I18nTypeDataListSimpleAllResp;
import com.solo.system.model.i18n.type.resp.I18nTypeDataListSimpleResp;
import com.solo.system.service.SysI18nTypeDataService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 国际化语言类型数据关联 Service实现类
 * @author 十一
 * @since 2024-10-25 14:19
 * 人生若只如初见，何事秋风悲画扇
 **/
@Service
public class SysI18nTypeDataServiceImpl extends BasicServiceImpl<SysI18nTypeDataMapper, SysI18nTypeData> implements SysI18nTypeDataService {

    @Override
    public List<I18nTypeDataListSimpleResp> listSimple(Long dataId) {
        return mapper.listSimple(dataId);
    }

    @Override
    public List<I18nTypeDataListSimpleAllResp> listSimpleAll() {
        String acceptLanguage = ServletUtils.getAcceptLanguage();
        return mapper.listSimpleAll(acceptLanguage);
    }

}
